package com.biz.primus.ms.coupon.dao.redis;

import com.biz.primus.base.redis.CrudRedisDao;
import com.biz.primus.ms.coupon.dao.ro.CouponTypeRo;
import org.springframework.stereotype.Repository;

/**
 * 优惠券类型RedisDao
 *
 * @author david-liu
 */
@Repository
public class CouponTypeRedisDao extends CrudRedisDao<CouponTypeRo, Long> {

    public void incrTotalQuantity(Long couponTypeId, Integer quantity) {
        super.hincrBy(super.getHashKey(couponTypeId), "totalQuantity".getBytes(), quantity);
    }
}
